
CLI Architecture
CLI Command and Option Parser: This module parses the command provided by the user and checks for different options provided within the command.
XML Parser: This module will parse the XML configuration file to read the default configuration values set in the file.
I/O Handler: I/O handler is used to handle the file related operation like opening, reading, writing, and closing the file. It also supports reading of the command from the command prompt and displaying the required output and error information on the command prompt.
Log Module: Log module logs different information on execution of the command into the log file option to enable and disable the log is provided in the configuration file and also option is provided to set different log levels.
Error Handler: Error handler maintains the stack of errors on failure. Error handler also helps in obtaining the proper error information on failure.
Configuration Loader: Based on the values set in the configuration file and the options provided in the CLI command, the required configuration values to execute the command will be updated in the data structure used for holding configuration values.
Certificate Loader and Verifier: This module loads and verifies the certificate to be used for signature verification with the configured root certificate.
Algorithm Configuration Module: This module configures the signature algorithm to be used for executing the command in the configuration data structure.
Data structure for holding configuration values:The configuration parameters necessary for execution of the command will be updated and used in the configuration data structure.
Command Executor: This module executes the command based on the loaded configuration parameters in the data structure used for holding configuration values.
Digital Signature Generator/Verify: This module generates and verifies the digital signature for the following file types:
Single file: Digital signature verification for the single file.
Multiple files: Digital signature verification for the list of files.
Directory: Digital Signature verification for the files within the directory.
ZIP Package Creator :Once the digital signature is generated based on the command option, a data file for which the digital signature is generated and the file having digital signature will be packed in the ZIP format.